-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background image support: Fix issue with background position keyboard entry #59050
Conversation
…ard entry happens before mouse interaction
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +11 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Flaky tests detected in c3cd8ce. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7910787583
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing this bug!
Thanks for the quick review! 🙇 |
…ard entry happens before mouse interaction (#59050) Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
I just cherry-picked this PR to the more/backports-for-beta3 branch to get it included in the next release: 9b48e86 |
…ard entry happens before mouse interaction (#59050) Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
What?
Part of: #54336
Fix keyboard entry for the background image block support's position controls.
Why?
If a user has not yet interacted with the background position controls via the mouse, then when entering a number in one of the "left" or "top" fields, we need to update the opposing side to a default value, otherwise it is set to
NaN
and fails to update the block attributes.Currently, for folks entering numbers by keyboard and not interacting via the mouse, it's impossible to set any values.
How?
0.5
(50%) so that the controls become usable again.Testing Instructions
trunk
, note that once you tab out of the field, the value does not stick. With this PR applied, when you add a value, the empty value on the other side should default to50%
.Testing Instructions for Keyboard
As above.
Screenshots or screencast
Trunk
2024-02-15.14.27.04.mp4
This PR
2024-02-15.14.25.06.mp4